package com.stlm2.dems.entity;

/**
 * 支付渠道
 */
public enum PayChannel {
    Allinpay(1) {
        public String toString() {
            return "通联";
        }
    },
    BankCard(2) {
        public String toString() {
            return "银行卡";
        }
    },
    Alipay(3) {
        public String toString() {
            return "支付宝";
        }
    },
    Wechat(4) {
        public String toString() {
            return "微信";
        }
    },
    Balance(5) {
        public String toString() {
            return "钱包余额";
        }
    },
    alipay_app(6) {
        public String toString() {
            return "支付宝APP支付";
        }
    },
    pingxx_wx(7) {
        public String toString() {
            return "微信APP支付";
        }
    },
   alipay_wap(8) {
        public String toString() {
            return "支付宝手机网页";
        }
    },
    wx_pub(9) {
        public String toString() {
            return "微信公众号支付";
        }
    },
    wx_wap(10) {
        public String toString() {
            return "微信公网页支付";
        }
    },
    alipay_pc_direct(11){
        public String toString() {
            return "支付宝即时到帐支付，即支付宝PC网页支付";
        }
    },
    SYS(66) {
        public String toString() {
            return "系统充值";
        }
    },
    alipay_android(12) {
        public String toString() {
            return "支付宝安卓客户端";
        }
    },
    alipay_ios(13) {
        public String toString() {
            return "支付宝苹果客户端";
        }
    },
    IntegralConversion(14) {
        public String toString() {
            return "积分兑换";
        }
    },
    IntegralPrize(15) {
        public String toString() {
            return "积分抽奖";
        }
    };

    private final int val;

    PayChannel(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static PayChannel getByIntValue(int n) {
        switch (n) {
            case 1:
                return Allinpay;
            case 2:
                return BankCard;
            case 3:
                return Alipay;
            case 4:
                return Wechat;
            case 5:
                return Balance;
            case 6:
                return alipay_app;
            case 7:
                return pingxx_wx;
            case 8:
                return alipay_wap;
            case 9:
                return wx_pub;
            case 10:
                return wx_wap;
            case 11:
                return alipay_pc_direct;
            case 66:
                return SYS;
            case 12:
                return alipay_android;
            case 13:
                return alipay_ios;
            case 14:
                return IntegralConversion;
            case 15:
                return IntegralPrize;
            default:
                return null;
        }
    }

}
